<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Startend extends Model
{
    //
    protected $table = "startends";

    protected $fillable = ["category_id", "value", "type",];

//    所属站点
    public function sites()
    {
        return $this->belongsTo(Sites::class);
    }

    public function switchword($word)
    {
        return str_replace("#w#", $word, $this->value);
    }

}
